import service from '@/utils/request'

export const API_MENU = {
  // 查询菜单列表
  listMenu:(query?:any)=>{return service.get('/system/menu/list',{params:query})},
  // 查询菜单详细
  getMenu:(menuId:string|number)=>{return service.get('/system/menu/' + menuId)},
  // 查询菜单下拉树结构
  treeselect:()=>{return service.get('/system/menu/treeselect')},
  // 根据角色ID查询菜单下拉树结构
  roleMenuTreeselect:(roleId:string|number)=>{return service.get('/system/menu/roleMenuTreeselect/' + roleId)},
  // 新增菜单
  addMenu:(data:any)=>{return service.post('/system/menu',data)},
  //修改菜单
  updateMenu:(data:any)=>{return service.put('/system/menu',data)},
  // 删除菜单
  delMenu:(menuId:string|number)=>{return service.delete('/system/menu/' + menuId)}
}

